package top.pcat.config;

import io.netty.channel.Channel;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurrent.GlobalEventExecutor;
import lombok.extern.slf4j.Slf4j;
import top.pcat.entity.Sender;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Slf4j
public class ServerConfig {
    public static String serverId;

    public static String serverHost;

    public static Map<String, Channel> senderToChannelMap = new ConcurrentHashMap<>();

    public static ChannelGroup channelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

    public static Map<Channel, Long>  channelToRoomIdMap = new ConcurrentHashMap<>();

    public static Map<Channel, Sender> channelToSenderMap = new ConcurrentHashMap<>();


}
